<template>
  <PcIndex v-if="!isMobile"></PcIndex>
  <PhIndex v-if="isMobile"></PhIndex>
</template>

<script lang="ts" setup>
import {reactive, ref, onMounted, defineAsyncComponent, nextTick} from "vue";
const PcIndex = defineAsyncComponent(() => import('@/views/login/pcindex.vue'));
const PhIndex = defineAsyncComponent(() => import('@/views/login/phindex.vue'));
const isMobile = ref(false)
const checkDeviceType = ()=>{
  isMobile.value = ! (navigator.userAgent.indexOf('Windows') != -1 || navigator.userAgent.indexOf('Macintosh') != -1);
}

onMounted(()=>{
  nextTick(()=>{
    checkDeviceType();
  })
})
</script>

<style lang="less" scoped>
</style>
